# Contributor: Clayton Craft <clayton@craftyguy.net>
# Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=py3-lsp-server
pkgver=1.4.1
pkgrel=0
pkgdesc="python implementation of the language server protocol, fork of python-language-server"
url="https://github.com/python-lsp/python-lsp-server"
arch="noarch !armhf !s390x"  # armhf: no py3-qt, s390x: no py3-pylint
license="MIT"
depends="py3-jedi py3-pluggy py3-ujson py3-lsp-jsonrpc py3-pydocstyle
py3-setuptools python3"
makedepends="py3-setuptools_scm py3-wheel"
checkdepends="
	py3-autopep8
	py3-flake8
	py3-flaky
	py3-matplotlib
	py3-mccabe
	py3-numpy
	py3-pandas
	py3-pycodestyle
	py3-pyflakes
	py3-pylint
	py3-pytest
	py3-pytest-cov
	py3-python-versioneer
	py3-qt5
	py3-rope
	py3-yapf
	"
source="https://files.pythonhosted.org/packages/source/p/python-lsp-server/python-lsp-server-$pkgver.tar.gz"
builddir="$srcdir/python-lsp-server-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# deselect'ed tests are broken
	pytest -v test/ \
		--deselect test/plugins/test_flake8_lint.py \
		--deselect test/plugins/test_pylint_lint.py \
		-k "not test_jedi_completion_environment and not test_symbols_all_scopes_with_jedi_environment"
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
4c9171adc88d219c80055ebbc76566583925129969467c156277b52de9b5981b74b11b9961247045ea98cd9e51e146b2d606c8351a7be5db76f6f4e0e4d7195c  python-lsp-server-1.4.1.tar.gz
"
